<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Zombie Navigator: Home</title><script src="scripts/prettify/prettify.js"> </script><link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"><link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"></head><body><div id="main"><h1 class="page-title">Home</h1><h3> </h3><section><article><h1>Zombie Navigator</h1><p>Usage example:</p><p><code>$ ZOMBIE_NAVIGATOR_SCRIPT_PATH=/tmp/script.js firefox</code></p><p><code>/tmp/script.js</code>:</p><pre class="prettyprint source"><code>'use strict';
const {delay, run} = require('zombie/async');
const {console} = require('zombie/zombie');
run(function* () {
  const {openWindow, openPrivateWindow} = require('zombie/webbrowser');
  try {
    let window1 = yield openWindow('about:');
    console.log(window1.uri);
    yield delay(5); // sleep for 5 seconds
    let promise = window1.runScript(uri => {
      location.href = uri;
      return 42;
    }, 'about:buildconfig');
    yield window1.waitForReload();
    console.log((yield promise), window1.uri);
    yield delay(10.5); // sleep for 10.5 seconds
    yield window1.close();
    console.log('closed');
  } catch (e) {
    console.error('Error:', e);
  }
})
.catch(function (e) {
  // uncaught exceptions
});</code></pre><p>Firefox (or equivalent) 38+ is required.</p><h2>License</h2><p>Copyright © 2015  Zombie Navigator Developers</p><p>This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.</p><p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.</p><p>You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p></article></section></div><nav><h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-zombie_async.html">zombie/async</a></li><li><a href="module-zombie_webbrowser.html">zombie/webbrowser</a></li><li><a href="module-zombie_zombie.html">zombie/zombie</a></li></ul><h3>Classes</h3><ul><li><a href="module-zombie_webbrowser-Window.html">Window</a></li></ul><h3>Namespaces</h3><ul><li><a href="module-zombie_zombie-console.html">console</a></li><li><a href="module-zombie_zombie-zombie.html">zombie</a></li></ul></nav><br class="clear"><footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a></footer><script> prettyPrint(); </script></body></html>
